home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 1 / CU Amiga Magazine CD-ROM Special Edition (1995)(EMAP Images)(GB)[Issue 1995-11].iso / Aminet / comm / tcp / ATCP_sdk_40_gc.lha / AmiTCP-4.0-gcc / netinclude / inetd.h < prev    next >
C/C++ Source or Header  |  1995-06-04  |  2KB  |  66 lines

  1. #ifndef INETD_H
  2. #define INETD_H \
  3.     "$Id: inetd.h,v 4.1 1994/10/03 20:52:20 ppessi Exp $"
  4. /*
  5.  *    Internet daemon interface definitions
  6.  *
  7.  *    Copyright © 1994 AmiTCP/IP Group,
  8.  *             Network Solutions Development, Inc.
  9.  *             All rights reserved.
  10.  */
  11.  
  12. #ifdef __AMITCP__
  13. /*
  14.  * The DaemonPort structure and its associated memory
  15.  * must be allocated with AllocVec call
  16.  */
  17. struct DaemonPort {
  18.   struct MsgPort dp_Port;
  19.   void           (*dp_ExitCode)();
  20. };
  21.  
  22. #define DAEMONPORTNAME "inetd.ipc"
  23.  
  24. /*
  25.  * A message associated with each launched process
  26.  */
  27. struct DaemonMessage {
  28.   struct Message dm_Msg;    /* Message name is FreeVec()'ed by inetd */
  29.   struct Process*dm_Pid;    /* set by the launcher */
  30.   struct Segment*dm_Seg;    /* used only if resident segment */
  31.   LONG         dm_Id;     /* socket id */
  32.   LONG         dm_Retval;    /* non-zero errorcode */
  33.   UBYTE      dm_Family;    /* address/protocol family */
  34.   UBYTE      dm_Type;
  35. };
  36.  
  37. /* Daemon types, used as socket types */
  38. #define DMTYPE_UNKNOWN     -1
  39. #define DMTYPE_INTERNAL  0        /* type is within builtin struct */
  40. #define DMTYPE_STREAM     SOCK_STREAM    /* stream socket */
  41. #define DMTYPE_DGRAM     SOCK_DGRAM    /* datagram socket */
  42. #define DMTYPE_RAW     SOCK_RAW    /* raw-protocol interface */
  43. #define DMTYPE_RDM     SOCK_RDM    /* reliably-delivered message */
  44. #define DMTYPE_SEQPACKET SOCK_SEQPACKET /* sequenced packet stream */
  45.  
  46. /* Return values from the startup code */
  47. #define DERR_LIB    0xA0
  48. #define DERR_OBTAIN 0xA1
  49.  
  50. #else /* AS225R2 */
  51. #include <exec/types.h>
  52. #include <exec/ports.h>
  53.  
  54. struct INETDmsg {
  55.     struct Message in_msg;
  56.     void    *in_sock;    /* socket that will be stdin/stdout    */
  57.     short    in_errno;    /* error number             */
  58.     char    future[32];    /* room for some expansion        */
  59. };
  60.  
  61. #define INETD_TIMEOUT    (10*50)
  62. #define INETD_RETRY    (5)
  63. #endif
  64.  
  65. #endif /* INETD_H */
  66.